package com.kx.center.mappers;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.kx.center.entity.Order;
import com.kx.center.entity.OrderDetail;
import com.kx.center.entity.query.QueryOrder;

public interface OrderMapper {
	public void insertOrder(Order entity);
	public void insertOrderDetail(OrderDetail entity);
	
	public void updateOrder(Order entity);
	public void updateOrderDetail(OrderDetail entity);
	
	public Order findOrderById(Integer orderId);
	public Order findOrderBySN(String sn);
	
	public List<Order> findOrderByStoreId(Integer storeId);
	public List<OrderDetail> findOrderDetailByOId(Integer oId);
	public OrderDetail findOrderDetail(@Param("orderId")Integer orderId, @Param("goodsId")Integer goodsId);
	
	public List<Order> queryOrder(QueryOrder query);
	public Integer queryOrderCount(QueryOrder query);
	
}
